import React, {Component} from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import './styles/textBox.less'
/**
 * 文本输入框
 *
 */
class TextBox extends Component {
    render(){
        let  props = this.props
        let { className, id, disabled, readOnly, placeholder,} = props

        className = classNames({[`${id}`]: id})

        return <input type='text' className={className} id={id} disabled={disabled} readOnly={readOnly} placeholder={placeholder}/>

    }
}
TextBox.defaultProps = {
    disabled: false,
    readonly: false,
}
TextBox.propTypes = {
    id: PropTypes.string,
    disabled: PropTypes.bool,
    readOnly: PropTypes.bool,
    placeholder: PropTypes.string,
}
export default TextBox;